import { TableColumnData } from "@arco-design/web-vue";

const t = translate("公共模块");

export const columns: Array<TableColumnData> = [
  { title: "index", dataIndex: "index", width: 60, slotName: "index" },
  {
    title: "价签图片",
    dataIndex: "imgSrc",
    slotName: "imgSrc",
    width: 120,
    tooltip: false
  },
  {
    title: "价签编码",
    dataIndex: "tagCode",
    width: 240,
    slotName: "tagCode"
  },

  { title: "店名", dataIndex: "storeName" },
  {
    title: "价签状态",
    dataIndex: "status",
    width: 100
    // filterable: {
    //   filters: [
    //     {
    //       text: t.value?.["在线"],
    //       value: "0"
    //     },
    //     {
    //       text: t.value?.["离线"],
    //       value: "1"
    //     }
    //   ]
    // }
  },
  {
    title: "价签尺寸",
    dataIndex: "resolutionDesc",
    // filterable: {
    //   filters: [],
    //   filter: (value, record) => {
    //     return record.resolutionDesc === value;
    //   },
    //   multiple: false,
    //   triggerProps: {
    //     showArrow: true
    //   }
    // },
    width: 120
  },
  {
    title: "信号",
    dataIndex: "rssi",
    width: 100,
    sortable: {
      sortDirections: ["ascend", "descend"],
      sorter: true
    }
  },
  {
    title: "刷新次数",
    dataIndex: "refreshTimes",
    sortable: {
      sortDirections: ["ascend", "descend"],
      sorter: true
    },
    width: 120
  },
  {
    title: "剩余电量",
    dataIndex: "soc",
    width: 120
    // sortable: {
    //   sortDirections: ["ascend", "descend"],
    //   sorter: true,
    // },
  },
  { title: "绑定时间", dataIndex: "bindingTime" },
  { title: "价签颜色", dataIndex: "tagColor" },
  { title: "绑定模式", dataIndex: "bindMode", slotName: "bindMode" },
  { title: "区域", dataIndex: "location", slotName: "location" },
  // { title: "价签ID", dataIndex: "tagId" },
  // { title: "剩余电量", dataIndex: "power" },
  { title: "基站名称", dataIndex: "stationName" },
  // { title: "最后在线时间", dataIndex: "lastOnlineTime" },
  // { title: "商品ID", dataIndex: "goodsId" },
  // { title: "模板ID", dataIndex: "templateId" },
  // { title: "价签ID", dataIndex: "stationId" },
  // { title: "价签尺寸", dataIndex: "resolutionId" },
  { title: "商品", dataIndex: "goodsName", width: 180 },
  { title: "条形码", dataIndex: "barcode", width: 180 },
  // { title: "分辨率宽度", dataIndex: "resolutionWidth" },
  // { title: "分辨率高度", dataIndex: "resolutionHeight" },
  // { title: "基站编码", dataIndex: "stationNum" },
  { title: "模板名称", dataIndex: "templateName", width: 160 },
  // { title: "速率", dataIndex: "rate" },
  // { title: "最近更新时间", dataIndex: "lastUpdateTime" },
  {
    title: "摄氏温度",
    dataIndex: "centigrade",
    slotName: "centigrade",
    width: 120
  },
  {
    title: "升级状态",
    dataIndex: "upgraded",
    width: 120,
    slotName: "upgraded"
  },
  { title: "固件版本", dataIndex: "fwVersion" },
  {
    title: "操作",
    dataIndex: "optional",
    slotName: "optional",
    fixed: "right",
    width: 240,
    align: "center"
  }
];
